<!DOCTYPE html>
<html lang="en">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!-- Meta, title, CSS, favicons, etc. -->
    <meta charset="utf-8">
    
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>${_title}</title>

    <!-- Bootstrap core CSS -->

    <link href="${_css}/bootstrap.min.css" rel="stylesheet">

    <link href="${_font}/css/font-awesome.min.css" rel="stylesheet">
    <link href="${_css}/animate.min.css" rel="stylesheet">
	<link rel="stylesheet" href="${_css}/base.css">
    <!-- Custom styling plus plugins -->
    <link href="${_css}/custom.css" rel="stylesheet">
    <link href="${_css}/icheck/flat/green.css" rel="stylesheet">
    <link href="${_css}/datatables/tools/css/dataTables.tableTools.css" rel="stylesheet">

    <script src="${_js}/jquery.min.js"></script>
    <script src="${_js}/resize.js"></script>
	<script type="text/javascript" src="${_front_js}/jquery.page.js"></script>
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
          <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
          <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
        <![endif]-->
	<style>
		td a{
			cursor:pointer
		}
	</style>
</head>


<body style="background: #F7F7F7;">
<div class="">
    <div class="row">
        <div class="col-md-12 col-sm-12 col-xs-12">
            <div class="x_panel">
	            <div class="x_title">
					<h2>邀请用户排名列表</h2>
					<div class="clearfix"></div>
				</div>
                <div class="pull-right">
                	<button id="query" type="button" class="btn btn-info">查询</button>
                </div>
                <form class="form-horizontal form-label-left input_mask">
                	<div class="col-md-2 col-sm-2 col-xs-5 form-group has-feedback">
                        <select class="form-control" id="invitedUserType" >
                        	<option value="" <#if !invitedUserType?exists>selected="selected"</#if>>--请选择邀请用户类型--</option>
							<option value="1" <#if invitedUserType?exists & invitedUserType==1>selected="selected"</#if>>客户</option>
							<option value="2" <#if invitedUserType?exists & invitedUserType==2>selected="selected"</#if>>内部员工</option>
						</select>
                    </div>
                    <div class="col-md-2 col-sm-2 col-xs-5 form-group has-feedback">
                        <select class="form-control" id="userOperateType" >
                        	<option value="" <#if !userOperateType?exists>selected="selected"</#if>>--请选择受邀用户操作类型--</option>
							<option value="1" <#if userOperateType?exists & userOperateType==1>selected="selected"</#if>>已投资</option>
							<option value="2" <#if userOperateType?exists & userOperateType==2>selected="selected"</#if>>已实名认证</option>
							<option value="3" <#if userOperateType?exists & userOperateType==3>selected="selected"</#if>>未实名认证</option>
						</select>
                    </div>
                 </form>
                <div class="clearfix"></div>
            </div>
            <div class="scroll">
                <div class="x_content">
                    <table id="example" data-action="/admin/user/listInviteUser/rank?1=1" class="table table-striped responsive-utilities jambo_table">
                        <thead>
                            <tr class="headings">
                                <th>
                                    <input type="checkbox" class="tableflat">
                                </th>
                                <th>名次</th>
                                <th>用户名</th>
                                <th>真实姓名</th>
                                <th>总邀请人数</th>
                            </tr>
                        </thead>
                        <tbody>
			                <#if (pageInfo.pageList?size > 0)>
			                	<#assign rank = pageInfo.start>
								<#list pageInfo.pageList as model>
									<tr class="even pointer">
		                                <td class="a-center ">
		                                    <input type="checkbox" class="tableflat">
		                                </td>
		                                <td>
		                                	<#assign rank = rank+1> 
		                                	${rank-1}
		                                </td>
		                                <td>
		                                	<#if model.invitedUsername?exists>
			                                	${model.invitedUsername}
		                                	</#if>
		                                </td>
		                                <td>
		                                	<#if model.invitedRealname?exists>
		                                		${model.invitedRealname}
		                                	</#if>
		                                </td>
		                                <td>
		                                	<#if model.invitedCount?exists>
		                                		${model.invitedCount}	
		                                	</#if>                                	
		                                </td>
		                             </tr>  
		                        </#list>
								<#else>
								<tr class="even pointer">
									<td colspan="11">无记录</td>
								</tr>
							</#if>
                        </tbody>
                    </table>
                    <#if (pageInfo.pageList?size > 0)>
	                	<#include "../base/Page.ftl">
	                </#if>
                </div>
            </div>
        </div>
        <br />
        <br />
        <br />
    </div>
</div>
                    
<script src="${_js}/bootstrap.min.js"></script>

<!-- bootstrap progress js -->
<script src="${_js}/progressbar/bootstrap-progressbar.min.js" type="text/javascript"></script>
<script src="${_js}/nicescroll/jquery.nicescroll.min.js" type="text/javascript"></script>
<!-- icheck -->
<script src="${_js}/icheck/icheck.min.js" type="text/javascript"></script>

<script src="${_js}/custom.js" type="text/javascript"></script>

<!-- PNotify -->
<script src="${_js}/notify/pnotify.core.js" type="text/javascript"></script>
<script src="${_js}/notify/pnotify.buttons.js" type="text/javascript"></script>
<script src="${_js}/notify/pnotify.nonblock.js" type="text/javascript" ></script>

<script>
    $(document).ready(function () {
        $('input.tableflat').iCheck({
            checkboxClass: 'icheckbox_flat-green',
            radioClass: 'iradio_flat-green'
        });
    });
</script>
<script>
	
	function initData(action) { 
		var invitedUserType = $("#invitedUserType").find("option:selected").val();
		var userOperateType = $("#userOperateType").find("option:selected").val();
    	if(invitedUserType != ""){
    		action += "&invitedUserType="+invitedUserType;
    	}
    	if(userOperateType != ""){
    		action += "&userOperateType="+userOperateType;
    	}
		window.location.href=action;
	} 
	
	$(".btn-info").click(function(){
		initData($("#example").attr('data-action'));
	});
	
</script>
</body>

</html>